//
// Created by lee on 2022/4/17.
//

#ifndef REPLACER_H
#define REPLACER_H
#include <list>

struct Replacer {
    int maxCells;
    std::list<int> replaceCell;

    Replacer(){
        maxCells = 0;
    }
    Replacer(int cells){
        maxCells = cells;
    }
    int getReplaceCell(){
        int id = replaceCell.front();
        replaceCell.pop_front();
        replaceCell.push_back(id);
        return id;
    }
    void insertReplaceCell(int cell){
        replaceCell.push_back(cell);
    }

};


#endif //REPLACER_H
